/*
 * @ : Copyright (c) 2021 Phytium Information Technology, Inc. 
 *  
 * SPDX-License-Identifier: Apache-2.0.
 * 
 * @Date: 2021-08-23 16:20:51
 * @LastEditTime: 2021-08-25 14:48:14
 * @Description:  This files is for 
 * 
 * @Modify History: 
 *  Ver   Who        Date         Changes
 * ----- ------     --------    --------------------------------------
 */
#ifndef BSP_ARCH_ARMV8_AARCH64_GENERIC_TIMER_H
#define BSP_ARCH_ARMV8_AARCH64_GENERIC_TIMER_H

#ifdef __cplusplus
extern "C"
{
#endif

#include "ft_types.h"

    typedef void (* GenericTimerTickHandler)();

    void GenericTimerStart(void);

    void GenericTimerStop(void);

    void GenericTimerInterruptEnable(void);

    void GenericTimerInterruptDisable(void);

    u64 GenericTimerFrequecy(void);

    u64 GenericTimerRead(void);

    void GenericTimerCompare(u64 interval);

    void GenericTimerSetupSystick(u64 tickRateHz, GenericTimerTickHandler tickHandler, u32 intrPrority);
    
    u64 GenericGetTick(void);

#ifdef __cplusplus
}
#endif

#endif // !